Repository navigation
test(search): define supported boundaries of quickSelectSearch (R50-T042) - #90
Open
aniruddha-bongale wants to merge 1 commit into
Open
aniruddha-bongale wants to merge 1 commit into
aniruddha-bongale wants to merge 1 commit into
Conversation
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR addresses task R50-T042 for
quickSelectSearch. It documents the supported domain boundaries inSearch/QuickSelectSearch.jsciting the source preconditions established at Line 15 (if (!array || array.length <= k)), establishes a focused boundary test suite asserting both valid and explicitly unsupported sides of every boundary, and introduces an automated check runnerwork/R50-T042/check.py.Related Issue
Fixes: #42
Type of Change
Changes Made
Search/QuickSelectSearch.jsciting precondition checks at Line 15 (if (!array || array.length <= k)) and error handling at Line 16 (throw new Error('Invalid arguments')).Search/test/QuickSelectSearch.test.jscovering:[42],k = 0) asserting expected value[42]and array identity.k = 4, median) asserting partition guarantees.[]), and falsy arrays (null,undefined) assertingError('Invalid arguments').work/R50-T042/check.pyand saved verifiable execution evidence inwork/R50-T042/results.json.Screenshots / Recordings
N/A (Algorithmic / unit testing suite)
Testing
npx prettier --check Search/QuickSelectSearch.js Search/test/QuickSelectSearch.test.js work/R50-T042/results.jsonnpm test -- Search/test/QuickSelectSearch.test.js(10 tests passed)python3 work/R50-T042/check.py(all checks and tool version captures passed)Checklist
Additional Notes